﻿using System.Collections.Generic;

namespace Yz.Base
{
    public class VmReturn : ViewModel
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool suc { get; set; }
        /// <summary>
        /// 消息
        /// </summary>
        public string msg { get; set; }
    }
    /// <summary>
    /// 单个model的数据
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class VmData<T> : VmReturn where T : ViewModel
    {
        /// <summary>
        /// 数据
        /// </summary>
        public T data { get; set; }
    }
    public class VmList<T> : VmReturn where T : ViewModel
    {
        /// <summary>
        /// 数据集合
        /// </summary>
        public List<T> list { get; set; }
    }

    public class VmCount : VmReturn
    {
        /// <summary>
        /// 数量
        /// </summary>
        public int total { get; set; }
    }

    public class VmPageList<T> : VmList<T> where T : ViewModel
    {
        /// <summary>
        /// 数量
        /// </summary>
        public int total { get; set; }
    }
}
